package com.example.commonview;

import android.os.Bundle;
import android.widget.RadioButton;

import androidx.appcompat.app.AppCompatActivity;

public class radio_button extends AppCompatActivity {
private radio_button radioButton;
private radio_button radio_button;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_radio_button);

        RadioButton radioButton;
        RadioButton radioButton2;

        radioButton = findViewById(R.id.radioButton);
        radioButton2 = findViewById(R.id.radioButton2);
        radioGroup.setonCheckedChangeListener(radioGroup, i);
        {
            if (i == R.id.radioButton) {
                textView3.setText("您是女的");
            } else {

                textView3.setText("您是男的");
            }
        }
    }
}